package com.control.qct.businesssteward.adapter;

import android.graphics.Color;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.control.qct.businesssteward.R;
import com.control.qct.businesssteward.model.MyTheCargoModel;

import java.util.List;

/**
 * Created by Administrator on 2018/1/29 0029.
 */

public class MyTheCargoAdapter extends BaseQuickAdapter<MyTheCargoModel,BaseViewHolder> {
    public MyTheCargoAdapter(@Nullable List<MyTheCargoModel> data) {
        super(R.layout.rv_my_the_cargo_list_item, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, MyTheCargoModel item) {
        switch (item.getStatus()){
            case 0:
                holder.setText(R.id.tv_the_cargo_status,"已同意");
                holder.setTextColor(R.id.tv_the_cargo_status, Color.parseColor("#05C0AB"));
                break;
            case 1:
                holder.setText(R.id.tv_the_cargo_status,"待回应");
                holder.setTextColor(R.id.tv_the_cargo_status, Color.parseColor("#333333"));
                break;
            case 2:
                holder.setText(R.id.tv_the_cargo_status,"已拒绝");
                holder.setTextColor(R.id.tv_the_cargo_status, Color.parseColor("#FF4B6E"));
                break;
        }
    }
}
